package cn.learn.test;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

/**
 * @author : Yu.Tan
 * @date : 2022/12/2 17:30
 * @desc : **
 */
public class GetAnswers {

    private static Map<String,String> categoryLink= new HashMap<String, String>();

    public static void main(String[] args) {
//        try {
////            Document dom = Jsoup.connect("https://zhidao.baidu.com/list?category=K12").userAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36").timeout(5000).get();
//            Document dom = Jsoup.connect("http://zhidao.baidu.com/browse/790").userAgent("Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36 QIHU 360EE").timeout(5000).get();
//            Element categorys = dom.select(".category-list").first();
//            Elements allLi = categorys.select("li");
//
//            for (Element li:allLi) {
//                categoryLink.put(li.text(), "http://zhidao.baidu.com" + li.select("a").attr("href"));
//            }
//        } catch (Exception e) {
//            e.printStackTrace();
//        }

        String s = String.valueOf(null);
        System.out.println(s);
    }
}
